package admrouter

import (
	"github.com/gin-gonic/gin"
	"yundian/internel/app/handlers/pcl/admin/stewardgoodshandler"
	"yundian/internel/app/middlewares"
	"yundian/internel/pkg/dingo"
)

func InitGoods() dingo.ApiRouter {
	return func(g *gin.RouterGroup) {
		s := g.Group("goods")
		s.Use(middlewares.JwtAuthMiddleware)
		s.POST("list", stewardgoodshandler.HandleGetGoodsList)
		s.POST("insert", stewardgoodshandler.HandleInsertGoods)
		s.POST("update", stewardgoodshandler.HandleUpdateGoods)
		s.POST("details", stewardgoodshandler.HandleGetGoodsDetails)
		s.POST("set-status", stewardgoodshandler.HandleGoodsSetStatus)

		s.POST("get-goods-order-list", stewardgoodshandler.HandleGetGoodsOrderList)       // 商户查询订单列表
		s.POST("get-goods-order-details", stewardgoodshandler.HandleGetGoodsOrderDetails) // 商户查询订单详情

		s.POST("set-goods-order-status", stewardgoodshandler.HandleSetGoodsOrderStatus) // 设置商品状态-是否已完成配送
	}
}
